var routes = [
    {
        path: '/index',
        name: 'index',
        component: () => import('../views/Index.vue'),
        children:[  //二级路由
            {
                path: '/index/home',
                name: 'home',
                component: () => import('../views/index/Home.vue'),
            },
            {
                path: '/index/tuan',
                name: 'tuan',
                component: () => import('../views/index/Tuan.vue'),
                children:[  //三级路由
                {
                    path: '/index/tuan/qianggou',
                    name: 'qianggou',
                    meta:{title:'抢购'},
                    component: () => import('../views/Index/Tuan/Qianggou.vue')
                },
                {
                    path: '/index/tuan/shangxin',
                    name: 'shangxin',
                    meta:{title:'上新'},
                    component: () => import('../views/Index/Tuan/Shangxin.vue')
                },
                {
                    path: '/index/tuan',
                    redirect: '/index/tuan/qianggou'
                }
            ]
            },
            {
                path: '/index/order',
                name: 'order',
                component: () => import('../views/index/Order.vue')
            },
            {
                path: '/index/mine',
                name: 'mine',
                component: () => import('../views/index/Mine.vue')
            }
        ]
    },
    {
        path: '/',
        redirect: '/index/home',
    },
    // {
    //     path:'*',
    //     component: () => import('../views/NotFound.vue')
    // }
]

export default routes